/*******************************************************************************************************

Figure A2: Petitions from the borough constituencies in our sample compared to petitions
from all locations, by year.

*******************************************************************************************************/

*Set directory path
cd "C:\Users\tsa23\Documents\petitions\replication files"

clear all
*read in our main dataset
use dta\did_rep.dta

*Sum petitions for the two treatment and countrol groups by year
collapse (sum) petitions, by(year)
label var petitions "Petitions in our data"

*Merge in data on all petitions by year from everywhere in England
merge 1:1 year using dta\all_petitions1820_38_rep.dta
drop _merge
set scheme plotplainblind
graph twoway scatter all year, ms(oh) || scatter petitions year, ms(0) || line all year || line petitions year, ytitle("Petitions") legend(order(1 "All English petitions" 2 "Petitions in our data"))
graph export graphs\figureA2.pdf, as(pdf) name("Graph") replace
